Short hand for number of tags having lengthier [and almost same] Xpath

Posted by infant programmer on Stack Overflow See other posts from Stack Overflow or by infant programmer
Published on 2010-03-25T07:35:47Z Indexed on 2010/03/25 7:43 UTC
Read the original article Hit count: 432

Filed under:
|
|
|

For example : this is an xslt

<xsl:template match="/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_1
|/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_2
|/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_3
 .
 .
|/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_N"/>

In the above code can I use the XPath /root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4 only once [use the braces or whatever] and reduce the bulkiness of the code?

As you can see, all the nodes are siblings of each-other, so except their name their Xpath is same. Is there any short-hand property ?

Does XSLT 1.0 (or Xpath1.0) allows it?

© Stack Overflow or respective owner

Related posts about xslt

Related posts about xsl